package com.ehome.poct.core.api.feign;

import com.ehome.poct.core.api.dto.check.TestRecordDetailDTO;
import com.ehome.poct.core.api.vo.checkdata.TestRecordDetailVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 检测记录
 *
 * @author ehome
 * @Date 2022-03-19 16:15
 */
@FeignClient(value = "${service.poct-core:}${service.suffix.poct-core:}", path = "/check/records", contextId = "recordDetail")
public interface TestRecordDetailClient {
    @PostMapping("/batch")
    void batchSave(@RequestBody List<TestRecordDetailDTO> records);

    @PatchMapping("/{id}")
    TestRecordDetailVO updateSelective(@PathVariable Long id, @RequestBody TestRecordDetailDTO recordDetailDTO);

    @GetMapping("/one")
    TestRecordDetailVO getOne(@SpringQueryMap TestRecordDetailDTO recordDetailDTO);

    @PutMapping("/updateRecord")
    TestRecordDetailVO updateRecordInfo(@RequestBody TestRecordDetailDTO recordDetailDTO);
}
